<template>
    <div class="left-center">
        <div>
            <router-link :to="{name:'Welcome'}">
                <img class="header-photo" src="/static/img/myphoto.jpg">
            </router-link>
            <hgroup>
                <h1 class="header-author">华洛</h1>
            </hgroup>
            <!-- <p class="header-subtitle">我可是要成为全栈的男人啊</p> -->
            <p class="header-subtitle">不是在敲代码</p>
            <p class="header-subtitle">就是在准备敲代码</p>
            <SwitchLi></SwitchLi>
        </div>
    </div>
</template>
<script>
import SwitchLi from '@/components/left-switchli'
export default {
  name: 'Center',
  components: {
    SwitchLi
  },
  methods: {
    backMain (arg) {
      this.$store.dispatch('setRigthPage', arg)
    }
  }
}
</script>
<style scoped>
.left-center {
    width: 76%;
    text-align: center;
    margin: 9.3rem auto 0;
}
.header-photo {
    border: 5px solid #fff;
    -webkit-border-radius: 300px;
    border-radius: 300px;
    width: 128px;
    height: 128px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: #88acdb;
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    text-align: center;
    transition:3s all ease;
    transform:perspective(600px) rotateY(0deg);
}
.header-photo:hover {
    transform:perspective(600px) rotateY(180deg);
    /* animation:widthAdd 3s linear; */
    /* animation-iteration-count: infinite; */
    /* animation-fill-mode: forwards; */
    /* animation-direction: alternate; */
}
@keyframes widthAdd{
    from{transform:rotateY(0deg);}
    to{transform:rotateY(180deg);}
}
.header-author {
    color: #696969;
}
.header-subtitle{
    text-align: center;
    color: #999;
    font-size: 14px;
    line-height: 25px;
    overflow: hidden;
    text-overflow: ellipsis;
    /* display: -webkit-box; */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
    letter-spacing: .3rem;
}
.switch-btn {
    margin-left: 74px;
    margin-top: 23px;
    position: relative;
    width: 70px;
    text-align: center;
}
@media screen and (max-width: 800px) {
    .left-center {
        width: 76%;
        text-align: center;
        margin: 3rem auto 0;
    }
}
</style>
